package dao;

import domain.Offer;

import java.util.List;
import java.util.Map;

/**
 * Created by aceyin on 15/6/29.
 */
public interface OfferDao extends GenericDao<Offer, Long> {
    List<Offer> queryByRecruitmentId(Long recruitmentId);

    Offer queryByApplierAndRecruitmentId(long applier, long recruitmentId);

    List<Offer> findRecruitmentOffersByStatus(long owner, String status);

    void updateOfferStatus(String status, List<Long> ids);

    Offer findOffer(long recruitmentId, long applier);

    int countOfferByApplierAndEmployer(long applier, long employer);

    List<Long> getApplierIds(long id);

    List<Offer> findUserOffersByStatus(long user, String stat, int page, int rows);

    List<Map<String, Object>> findWorkmates(Long recruitmentId);

    void updateRateResult(Long id, String rate);

    List<Offer> getAllOffersByStatus(long recruitmentId, long employerId, String status);

    void updatePayResult(List<Long> offerIds, String status);
}
